Blockchain-based transaction processing method and apparatus

ABSTRACT

A blockchain-based transaction processing method may comprise: in response to a designated account being logged in through an application client, generating, according to input to-be-operated account information and configured operation content, an operation instruction comprising the to-be-operated account information and the operation content; and sending the operation instruction to a node in a blockchain network, causing the node in the blockchain network to invoke a smart contract corresponding to the designated account upon receiving the operation instruction, and to execute an operation according to the operation content on another account corresponding to the to-be-operated account information.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of and claims priority to U.S.patent application Ser. No. 16/805,507, titled Blockchain-BasedTransaction Processing Method and Apparatus, filed Feb. 28, 2020, andissued as U.S. Pat. No. 10,740,763 on Aug. 11, 2020, which is adivisional of and claims priority to U.S. patent application Ser. No.15/933,545, titled Blockchain-Based Transaction Processing Method andApparatus, filed Mar. 23, 2018, and issued as U.S. Pat. No. 10,740,761on Aug. 11, 2020, which is based on and claims priority to the ChineseApplication No. 201710198859.1, filed Mar. 29, 2017. All of the aboveapplications are incorporated herein by reference in their entirety.

TECHNICAL FIELD

The present application relates to the field of blockchain technologiesand information processing technologies, and in particular, toblockchain-based transaction processing methods and apparatuses.

BACKGROUND

Along with the advancement in information technologies, the blockchaintechnology has attracted extensive attention for advantages of openness,unchangeability, and decentralization. In applications, the blockchaintechnology is usually applied to store transaction information generatedin transaction processes. Moreover, the emergence of smart contractsfurther expands the scope of transactions for blockchains.

A smart contract is usually a segment of codes stored in a blockchain(or a blockchain node in a blockchain network), which provides executionconditions of the smart contract and transaction processing logic,namely provides conditions to activate the smart contract and how toprocess transaction processing requests received after the smartcontract is activated.

For example, in the case of a transfer transaction, when a user Ainitiates a transfer processing request, a blockchain node determineswhether transfer parameters comprised in the transfer processing requestsatisfy the execution conditions of a smart contract corresponding tothe transfer transaction upon receiving the transfer processing request.If yes, the blockchain node executes the transfer processing request.Here, the execution conditions of a smart contract corresponding to thetransfer transaction can be interpreted as whether the balance in theaccount of the user A meets the required transfer amount and the like. Asmart contract is a digital promise entailing rights and dutiesvoluntarily agreed by the parties to the contract.

In real life, however, there is a type of administrative interventionactivities in the category of special transactions. For example, when auser performs illegal activities, a court order may be executed tofreeze the user's account. However, this operation activity conflictswith smart contracts in existing blockchains and cannot be carried out.

Therefore, there is a need for a blockchain-based transaction processingmethod that enables special transactions like administrativeintervention in a blockchain.

SUMMARY

Embodiments of the present application provide blockchain-basedtransaction processing methods and apparatuses to provide specialtransactions like administrative intervention in blockchains, thusovercoming the existing problem.

According to one aspect, a blockchain-based transaction processingmethod may comprise: in response to a designated account being logged inthrough an application client, generating, according to inputto-be-operated account information and configured operation content, anoperation instruction comprising the to-be-operated account informationand the operation content; and sending the operation instruction to anode in a blockchain network, causing the node in the blockchain networkto invoke a smart contract corresponding to the designated account uponreceiving the operation instruction, and to execute an operationaccording to the operation content on another account corresponding tothe to-be-operated account information.

According to another aspect, a blockchain-based transaction processingmethod implementable by a node in a blockchain network may comprise:acquiring an operation instruction comprising to-be-operated accountinformation and operation content; in response to determining that anaccount sending the operation instruction corresponds to an accountissuing the operation instruction, determining a smart contractcorresponding to the account issuing the operation instruction; andbased on the smart contract, executing an operation according to theoperation content on another account corresponding to the to-be-operatedaccount information.

According to another aspect, a blockchain-based transaction processingapparatus may comprise a processor and a non-transitorycomputer-readable storage medium storing instructions that, whenexecuted by the processor, cause the apparatus to perform a method. Themethod may comprise: generating, in response to a designated accountbeing logged in through an application client and according to inputto-be-operated account information and configured operation content, anoperation instruction comprising the to-be-operated account informationand the operation content; and sending the operation instruction to anode in a blockchain network, causing the node in the blockchain networkto invoke a smart contract corresponding to the designated account uponreceiving the operation instruction, and to execute an operationaccording to the operation content on another account corresponding tothe to-be-operated account information.

According to another aspect, a blockchain-based transaction processingapparatus may comprise a processor and a non-transitorycomputer-readable storage medium storing instructions that, whenexecuted by the processor, cause the apparatus to perform a method. Themethod may comprise: acquiring an operation instruction comprisingto-be-operated account information and operation content; in response todetermining that an account sending the operation instructioncorresponds to the account issuing the operation instruction,determining a smart contract corresponding to the account issuing theoperation instruction; and executing, based on the smart contract, anoperation according to the operation content on another accountcorresponding to the to-be-operated account information.

At least one technical solution employed above by the embodiments of thepresent disclosure can achieve the following advantageous effects.

In some embodiments, corresponding smart contracts are created fordifferent administrative supervision accounts (also referred to asdesignated accounts). In this way, upon receiving an operationinstruction sent from a designated account, a node in a blockchainnetwork can invoke a corresponding smart contract when determining thatthe operation instruction is issued legally, to execute correspondingoperations on an account corresponding to the to-be-operated accountinformation, which achieves supervision on accounts in the blockchainand enables special transactions like administrative intervention in ablockchain.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings described herein are used to provide a furtherunderstanding of the present disclosure. The illustrative embodiments ofthe present application and the description thereof are merely exemplaryand do not limit the scope of the present disclosure. In theaccompanying drawings:

FIG. 1 illustrates a blockchain-based transaction processing methodaccording to an embodiment of the present disclosure;

FIG. 2 illustrates a blockchain-based transaction processing methodaccording to an embodiment of the present disclosure;

FIG. 3 is a structural schematic diagram of a blockchain-basedtransaction processing apparatus according to an embodiment of thepresent disclosure;

FIG. 4 is a structural schematic diagram of a blockchain-basedtransaction processing apparatus according to an embodiment of thepresent disclosure.

DETAILED DESCRIPTION

The technical solutions of the present application will be clearly andcompletely described below with reference to various embodiments of thepresent disclosure and corresponding drawings. The described embodimentsare merely exemplary. All other embodiments obtainable by a personskilled in the art without inventive effort and on the basis of theembodiments of the present disclosure shall be encompassed by the scopeof the present disclosure.

The technical solutions according to embodiments of the presentdisclosure will be described in detail below with reference to theaccompanying drawings.

FIG. 1 illustrates a blockchain-based transaction processing methodaccording to an embodiment of the present disclosure, and thetransaction processing method may include the following steps. One ormore steps such as S101 may be optional.

S101: providing an application client for a designated account.

The designated account in embodiments of the present disclosure maycomprise a special account with administrative supervision capabilities.To ensure the security of the designated account, a dedicatedapplication client (e.g., a software application) may be provided forthe designated account.

A designated account may use the same application client or differentapplication clients for different administrative supervisioncapabilities. In other words, an application client can be provided tosupport the use thereon by designated accounts with a variety ofadministrative supervision capabilities, and different designatedaccounts can invoke corresponding functions according to their ownneeds. Furthermore, different application clients can be providedaccording to the needs of designated accounts, and each applicationclient is used exclusively for a designated account, which is notlimited herein.

S102: in response to the designated account being logged in through theapplication client, generating, according to input to-be-operatedaccount information and configured operation content, an operationinstruction comprising the to-be-operated account information and theoperation content.

In one embodiment, when an administrative supervision official needs toperform administrative supervision on one account, he/she needs tocomplete a login operation through the application client in the stepS101, namely by inputting a name and a login password of a designatedaccount matching the administrative supervision authorization of theadministrative supervision official on a login interface of theapplication client. At this moment, the application client can verifythe input name and login password of the designated account, and allowthe login to be completed when the verification is passed. In this way,it can ensure the security of implementation of the administrativesupervision in an Internet environment.

When the designated account is logged in through the application client,the administrative supervision official can input account information inneed of administrative supervision (the account information herein ishereinafter referred to as the to-be-operated account information) andoperation content on an operating interface provided by the applicationclient. Upon receiving the input to-be-operated account information andconfigured operation content, the application client can generate anoperation instruction comprising the to-be-operated account informationand the operation content according to the input to-be-operated accountinformation and configured operation content.

In one embodiment, when generating the operation instruction, the methodmay further comprises: using an algorithm to determine a summary of theoperation instruction, and using a private key in a public-private keypair corresponding to the designated account to encrypt the summary toobtain an encrypted summary.

The algorithm herein may be a Hash algorithm and may also be otheralgorithms, which is not limited herein.

In some embodiments, a set of public-private keys is determined fordifferent designated accounts. Namely, different designated accountshave different corresponding public-private key pairs, which caneffectively prevent leakage of the public-private key pairs.

S103: sending the operation instruction to a node in a blockchainnetwork, causing the node in the blockchain network to invoke a smartcontract corresponding to the designated account upon receiving theoperation instruction, and to execute an operation according to theoperation content on another account corresponding to the to-be-operatedaccount information.

In one embodiment, if an encrypting processing is performed on theoperation instruction, the encrypted summary and the operationinstruction need to be sent to a node in the blockchain when executingS103.

In one embodiment, the method further comprises: configuring smartcontracts for different designated accounts according to attributes ofthe designated accounts, the smart contracts being used to executeoperations according to operation instructions sent by the designatedaccounts, and different designated accounts having differentcorresponding smart contracts.

Smart contracts are an important content of transaction execution in ablockchain network. Smart contracts are created for different designatedaccounts in various embodiments of the present disclosure. Differentsmart contracts are created according to different attributes of thedesignated accounts, e.g., characteristics of the sent operationinstructions. Triggering conditions and transaction processing logic areprescribed in each smart contract. The transaction processing logicherein may be determined according to the operation content of anoperation instruction. The triggering conditions herein may bedetermined according to actual needs. For example, when an operationinstruction is received, whether the current operation is legal,reasonable, and the like is determined.

In some embodiments, a smart contract is recorded in a block in the formof smart contract address. When a node needs to invoke the smartcontract, the node can acquire the contents of the smart contractthrough the address of the smart contract.

Here, with respect to the address of a smart contract, the smartcontract can be stored in the node where a corresponding designatedaccount is at, which also assigns a storage address to the smartcontract. Alternatively, a third party apparatus provides a storageaddress for the smart contract, which is not limited herein. There aremany implementation manners with respect to the storage process of theabove smart contract, the form of the smart contract when stored in ablockchain (whether only the address of the smart contract is stored).

FIG. 2 illustrates a blockchain-based transaction processing methodaccording to an embodiment of the present disclosure, and thetransaction processing method may comprise the following steps. Themethod may be implementable by a node in a blockchain network.

S201: acquiring an operation instruction.

Here, the operation instruction may comprise to-be-operated accountinformation and operation content.

In one embodiment, all nodes in the blockchain can receive transactiondata input by a user and process the received transaction data, whereinthe transaction data may be input by the user through an account loggedin on the client of the node, by the user through another client andsent to the node, etc. Specific manner in which the transaction data issent or input to the node is not limited in the present disclosure.Then, the operation instruction acquired by a node in the step S210 mayalso be treated as transaction data. This transaction data may bedifferent from the transaction data described above, because thistransaction data needs to be processed through a particular smartcontract.

Assuming that an operation instruction is treated as transaction data,there are many types of transaction data, and the operation contentcomprised in the operation instruction may be carried in different formsin the transaction data. For example, when the blockchain is ablockchain with coins, the transaction data in a blockchain with coinscan be transaction data corresponding to transactions, and therefore theoperation content can be carried in transaction remarks of thetransaction data; when the blockchain is a blockchain without coins, thetransaction data in a blockchain without coins may correspond totransaction data that is not related to transactions, such as storage ofregistration information, identity verification transactions, etc., andtherefore there may not be strict form specifications on specificcontents of the transaction data. As a result, the operation content mayalso be treated directly as transaction data, which is not limited inthe present disclosure.

In some embodiments, the node in the blockchain may be a terminalinstalled with the blockchain client, e.g., cell phone, tablet computer,personal computer and the like, or may be a system comprising aplurality of apparatuses. In this disclosure, the node can comprise aserver, e.g., a server comprising an individual apparatus or a serversystem comprising a plurality of apparatuses.

S202: in response to determining that an account sending the operationinstruction corresponds to an account issuing the operation instruction,determining a smart contract corresponding to the account issuing theoperation instruction.

In one embodiment, when an operation instruction is acquired, theaccount issuing the operation instruction (the issuing account hereincan be interpreted as the designated account in S101) is determined, analgorithm (e.g., a pre-selected or set algorithm) is used to determine asummary of the operation instruction, and a public key in apublic-private key pair corresponding to the issuing account is used toencrypt the summary to obtain an encrypted summary.

The obtained encrypted summary is compared with the encrypted summarycomprised in the operation instruction to see if they are the same.

If the obtained encrypted summary is the same as the encrypted summarycomprised in the operation instruction, it is determined that theaccount sending the operation instruction is the same as the accountissuing the operation instruction, which indicates that the acquiredoperation instruction is legal.

Here, the issuing account recorded in the various embodiments may be anaccount owned by a government agency or a trustful institution. Sincecorresponding smart contracts are created for different designatedaccounts, it indicates that operation instructions issued by thedesignated accounts are recognized. As a result, effectiveadministrative supervision can be performed on all accounts in ablockchain network, and this type of supervision is limited, which willnot restrict normal transactions in the blockchain network.

In one embodiment, to ensure the validity of subsequent operations,after an operation instruction is acquired, a digital signature (e.g.,the encrypted summary) of the operation instruction can be further usedto perform identity verification (also referred to as signatureverification) on the designated account that sends the operationinstruction to determine whether the account sending the operationinstruction is a preset issuing account having the authority to send theoperation instruction.

When determining that the account sending the operation instruction isthe same as the account issuing the operation instruction, a smartcontract corresponding to the account issuing the operation instructioncan be further determined according to a preset mapping relationshipbetween issuing accounts and smart contracts.

In one example, as shown in FIG. 1, smart contracts can be configuredfor different designated accounts, and a mapping relationship betweendesignated accounts and smart contracts can be created:

TABLE 1 Types of designated account (issuing account) Smart contractOperation content Supervision account of a Smart contract 1 Freezing anaccount, judicial agency unfreezing an account Supervision account of aSmart contract 2 Suspension, resumption, securities agency closure,opening Supervision account of an Smart contract 3 Mandatory transferadministrative agency . . . . . . . . .

In some embodiments, different operation contents of the same designatedaccount can be configured with corresponding smart contracts. With asupervision account of a judicial agency as an example, a correspondingsmart contract can be configured for a freezing operation, and also acorresponding smart contract can be configured for an unfreezingoperation. These two smart contracts may be different from the smartcontract 1 shown in Table 1.

In one embodiment a smart contract corresponding to the issuing accountcan be further determined according to the relationship shown in Table1.

In one embodiment, furthermore, different designated accounts can beused to issue different operation instructions, wherein the operationinstructions may include, but are not limited to: a freezinginstruction, an unfreezing instruction, a suspension instruction, aresumption instruction, a closing instruction, an opening instruction,and a mandatory transfer instruction.

In one embodiment, furthermore, the above-described various operationinstructions with different functions may be present, and the operationinstructions all correspond to accounts corresponding to theto-be-operated account information. As a result, the operationinstructions are mandatory in some embodiments. In other words, thedesignated account has authority of supervision on all other accounts inthe blockchain, and therefore it is necessary to decentralize theauthority of supervision. The decentralization of the supervision powernot only can prevent an accident from occurring to one of the designatedaccounts (e.g., hijacked by criminals) that all supervision authority islost, but also can prevent a user of an account that operates thedesignated object from abusing the authority, etc. Therefore, aplurality of designated accounts having the authority to send differentoperation instructions can be present.

In this way, the supervision power of the accounts in the blockchain canbe decentralization, such that the supervision power against theblockchain is not centralized in one designated account and theeffectiveness and credibility of supervision can be ensured. At the sametime, it prevents the loss of all supervision power over the blockchainwhen one designated account is compromised.

S203: based on the smart contract, executing an operation according tothe operation content on another account corresponding to theto-be-operated account information.

In one embodiment of the present disclosure, when the operation contentsatisfies an execution condition of the smart contract, an operation canbe executed on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract.

For different operation contents, different operations are executed onan account corresponding to the to-be-operated account information. Insome embodiments, the operation contents will be described in detailbelow in terms of freezing an account, unfreezing an account, suspendingan account, resuming an account, closing an account, opening an account,and mandatory transfer of an account as examples.

If the operation content is to freeze an account, a freezing operationis executed on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount freezing comprised in the smart contract, the freezing operationbeing used to instruct to stop execution of transactions related to theto-be-operated account information.

In one example, when the operation instruction is a freezinginstruction, the operation parameters corresponding to the operationinstruction may include: a freezing type and an address of the frozenaccount, wherein the freezing type may comprise that sales and purchasesare prohibited for the frozen account, only sales are allowed for thefrozen account, purchases are prohibited for the frozen account, etc.Consequently, when a freezing operation is executed on an accountcorresponding to the to-be-operated account information, differentfreezing operations may be executed according to the freezing type.

If the operation content is to unfreeze an account, an unfreezingoperation is executed on an account corresponding to the to-be-operatedaccount information according to a transaction processing logiccorresponding to account unfreezing comprised in the smart contract, theunfreezing operation being used to instruct to resume execution oftransactions related to the to-be-operated account information.

In one embodiment, before executing an unfreezing operation on anaccount corresponding to the to-be-operated account information, themethod further comprises: determining whether the account correspondingto the to-be-operated account information is in a frozen state.

When it is determined that the account corresponding to theto-be-operated account information is in a frozen state, an unfreezingoperation is executed on the account corresponding to the to-be-operatedaccount information.

If the operation content is to suspend an account, a suspendingoperation is executed on an account corresponding to the to-be-operatedaccount information according to a transaction processing logiccorresponding to account suspension comprised in the smart contract, thesuspending operation being used to instruct the account corresponding tothe to-be-operated account information to stop execution oftransactions.

In one example, when the operation instruction is a suspendinginstruction, the operation parameters corresponding to the operationinstruction may include: a suspending parameter, wherein the suspendingparameter may be a suspension time period for the suspended account,e.g., a suspension starting time and a suspension ending time. When asuspending operation is executed on an account corresponding to theto-be-operated account information, the time to execute suspension onthe account corresponding to the to-be-operated account information canbe determined according to the suspending parameter, e.g., stopping theexecution of transactions when the suspension starting time is reached;when the suspension ending time is reached, automatically releasing thesuspended state, e.g., resuming the execution of transactions.

If the operation content is to resume an account, a resuming operationis executed on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount resumption comprised in the smart contract, the resumingoperation being used to instruct the account corresponding to theto-be-operated account information to resume execution of transactions.

In one embodiment, before executing a resuming operation on an accountcorresponding to the to-be-operated account information, the methodfurther comprises: determining whether the account corresponding to theto-be-operated account information is in a suspended state.

When it is determined that the account corresponding to theto-be-operated account information is in a suspended state, a resumingoperation is executed on the account corresponding to the to-be-operatedaccount information.

In some embodiments, if a suspended account receives a resumingoperation before the suspension ending time is reached, it does not needto wait until the suspension ending time is reached, but can directlyresume the execution of the received transaction instruction.

If the operation content is to close an account, a closing operation isexecuted on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount closure comprised in the smart contract, the closing operationbeing used to instruct to stop execution of transactions.

In one example, when a closing operation is executed on an accountcorresponding to the to-be-operated account information, an accountinformation queue corresponding to the to-be-operated accountinformation is determined, and a suspending operation is sequentiallyexecuted on an account corresponding to each piece of the accountinformation in the account information queue.

If the operation content is to open an account, an opening operation isexecuted on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount opening comprised in the smart contract, the opening operationbeing used to resume execution of transactions.

In one embodiment, a closing operation can be treated as a set ofclosing operations executed on all accounts. For example, a generalaccount on which a closing operation is executed corresponds to aplurality of sub-accounts. Once a closing operation is executed on thegeneral account, it means that a suspending operation will be executedon the plurality of sub-accounts corresponding to the general account.In one embodiment, once a closing operation is executed on the generalaccount, a group sending function can be used to send a suspendinginstruction to the sub-accounts controlled by the general account, whichthen realizes the execution of a suspending operation on all thesub-accounts, thereby achieving the effect that all the accounts in theblockchain are suspended at the same time, i.e., the effect of closure.

The opening principle is the same as the closing principle, whileopening is a reverse situation to closure, which will not be repeatedherein.

In one embodiment, furthermore, different states can be set for theaccounts. When the state of the account is set to be an opening state,the account can normally execute transactions; when the state of theaccount is set to be a closed state, the account stops execution oftransactions. Here, the states of the accounts are controlled throughthe closing instruction and the opening instruction. When closing isneeded, a management account of a securities agency can send a closinginstruction to invoke a corresponding smart contract, such that thestates of the accounts are adjusted to the closing state; when openingis needed, the management account of the securities agency can send anopening instruction to invoke a corresponding smart contract, such thatthe states of the accounts are adjusted to the opening state, therebyachieving an effect to control opening and closing of the blockchain.

In one embodiment, furthermore, script codes can be compiled on the nodelogged in by the designated account with respect to the sending of theclosing instruction and the opening instruction, such that the nodeautomatically sends the closing instruction and the opening instructionto achieve a goal of controlling opening and closing of the accounts.

In one example, the script codes can be JavaScript or the like, and theaccount information (e.g., account identifiers) of the accounts in theblockchain can be stored in the script codes or the node. When adesignated account needs to send the closing instruction, the scriptcodes can be run such that the script codes automatically execute,according to the stored account information of the accounts, asuspending operation on the accounts, respectively, to achieve an effectthat all accounts in the blockchain are suspended (i.e., an effect ofclosure).

If the operation content is a mandatory transfer, a mandatory transferoperation is executed on an account corresponding to the to-be-operatedaccount information according to a transaction processing logiccorresponding to mandatory transfer comprised in the smart contract, themandatory transfer operation being used for mandatory transfer of a setquantity of resources from the account corresponding to theto-be-operated account information according to the operation content.

In one example, when the operation instruction is a mandatory transferinstruction, the operation parameters corresponding to the operationinstruction may include: an address of the transfer-in account, anaddress of the transfer-out account, and a quantity limit of mandatorytransfer. When a mandatory transfer operation is executed on an accountcorresponding to the to-be-operated account information, a transactioncan be initiated according to the address of the transfer-in account,the address of the transfer-out account, and the quantity limit ofmandatory transfer, mandatorily transferring the quantity limit out ofthe transfer-out account into the transfer-in account.

Therefore, with the method above, a designated account in the blockchaincan perform supervision on all accounts through particular smartcontracts. Since the specific contents of the smart contracts can becompiled by staff according to the need of practical applications, thedesignated account is enabled to enforce transactions on all accounts inthe blockchain, thereby achieving supervision on the accounts in theblockchain. Since the operation instruction can be stored in a block ofthe blockchain, the operation instruction is unchangeable and can bequeried. Namely, the operation instruction is certified, such that theactivities of accounts of all designated objects are open andtransparent, which facilitates identification of activities that abusethe authority and consequently improves the credibility of accounts ofall the designated objects. Furthermore, the decentralization ofauthority of supervision on accounts of different designated objects canfurther avoid the possibility that the accounts on the blockchain areaffected due to comprising the account of a designated object. Whileavoiding normal operations of all accounts on the blockchain, the methodaccording to the various embodiments can add the authority ofsupervision on all the accounts, which solves the problem of difficultsupervision according to the existing blockchain technology.

With the solutions according to the embodiments of the presentdisclosure, corresponding smart contracts are created for differentadministrative supervision accounts (also referred to as designatedaccounts). In this way, upon receiving an operation instruction sentfrom a designated account, a node in a blockchain network can invoke acorresponding smart contract when determining that the operationinstruction is issued legally, to execute corresponding operations on anaccount corresponding to the to-be-operated account information, whichachieves a goal of supervision on accounts in the blockchain and solvesthe problem of processing special transactions like administrativeintervention in a blockchain.

On the basis of the blockchain-based transaction processing method shownin FIG. 1, the disclosure correspondingly provides a structuralschematic diagram of a blockchain-based transaction processingapparatus, as shown in FIG. 3.

FIG. 3 is a structural schematic diagram of a blockchain-basedtransaction processing apparatus 300 according to an embodiment of thepresent disclosure. The apparatus 300 may comprise a providing unit 301,a generating unit 302, and a sending unit 303.

The providing unit 301 optionally provides an application client for adesignated account.

The generating unit 302 generates, in response to the designated accountbeing logged in through the application client and according to inputto-be-operated account information and operation content, an operationinstruction comprising the to-be-operated account information and theoperation content.

The sending unit 303 sends the operation instruction to a node in theblockchain network, causing the node in the blockchain network to invokea smart contract corresponding to the designated account upon receivingthe operation instruction, and to execute an operation according to theoperation content on another account corresponding to the to-be-operatedaccount information.

In one embodiment, the transaction processing apparatus furthercomprises an encrypting unit 304.

The encrypting unit 304 uses, when generating the operation instruction,an algorithm to determine a summary of the operation instruction, anduses a private key in a public-private key pair corresponding to thedesignated account to encrypt the summary to obtain an encrypted summarySending the operation instruction by the sending unit 303 to a node inthe blockchain comprises sending the encrypted summary and the operationinstruction to a node in the blockchain.

In one embodiment, for different designated accounts, the correspondingpublic-private key pairs are different.

In one embodiment, the transaction processing apparatus furthercomprises a configuring unit 305.

The configuring unit 305 configures smart contracts for differentdesignated accounts according to attributes of the designated accounts,the smart contracts being used to execute operations according tooperation instructions sent by the designated accounts, and differentdesignated accounts having different corresponding smart contracts.

According to one aspect of the present disclosure, the units 301-305 aresoftware functional units stored in a memory, e.g., a non-transitory andcomputer-readable memory. The apparatus 300 may include a processor forexecuting the software functional units 301-305 to perform the relevantfunctions. According to another aspect, the units 301-305 may beimplemented by hardware, e.g., circuitry programmed to perform thefunctionalities.

On the basis of the blockchain-based transaction processing method shownin FIG. 2, the present disclosure further correspondingly provides astructural schematic diagram of a blockchain-based transactionprocessing apparatus, as shown in FIG. 4.

FIG. 4 is a structural schematic diagram of a blockchain-basedtransaction processing apparatus 400 according to an embodiment of thepresent disclosure. The apparatus 400 may comprise an acquiring unit401, a determining unit 402, and a processing unit 403.

The acquiring unit 401 acquires an operation instruction comprisingto-be-operated account information and operation content.

The determining unit 402 in response to determining that an accountsending the operation instruction corresponds to an account issuing theoperation instruction, determines a smart contract corresponding to theaccount issuing the operation instruction.

The processing unit 403 executes, based on the smart contract, anoperation according to the operation content on another accountcorresponding to the to-be-operated account information.

In another embodiment, the “determining by the determining unit 402 asmart contract corresponding to the issuing account” comprises:determining, according to a preset mapping relationship between issuingaccounts and smart contracts, a smart contract corresponding to theaccount issuing the operation instruction.

In one embodiment, the “determining by the determining unit 402 that theaccount sending the operation instruction is the same as the accountissuing the operation instruction” comprises: using an algorithm todetermine a summary of the operation instruction, and using a public keyin a public-private key pair corresponding to the issuing account toencrypt the summary to obtain an encrypted summary; and if the obtainedencrypted summary is the same as the encrypted summary comprised in theoperation instruction, determining that the account sending theoperation instruction is the same as the account issuing the operationinstruction.

In one embodiment, the “executing, by the processing unit 403 on thebasis of the smart contract, an operation according to the operationcontent on an account corresponding to the to-be-operated accountinformation” comprises: when the operation content satisfies anexecution condition of the smart contract, executing an operation on anaccount corresponding to the to-be-operated account informationaccording to a transaction processing logic corresponding to theoperation content comprised in the smart contract.

In one embodiment, the “executing by the processing unit 403 anoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract” comprises: if theoperation content is to freeze an account, executing a freezingoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount freezing comprised in the smart contract, the freezing operationbeing used to instruct to stop execution of transactions related to theto-be-operated account information.

In one embodiment, the “executing by the processing unit 403 anoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract” comprises: if theoperation content is to unfreeze an account, executing an unfreezingoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount unfreezing comprised in the smart contract, the unfreezingoperation being used to instruct to resume execution of transactionsrelated to the to-be-operated account information.

In one embodiment, the apparatus further comprises a deciding unit 404,wherein: the deciding unit 404 determines, before executing anunfreezing operation on an account corresponding to the to-be-operatedaccount information, whether the account corresponding to theto-be-operated account information is in a frozen state.

The “executing by the processing unit 403 an unfreezing operation on anaccount corresponding to the to-be-operated account information”comprises: when it is determined that the account corresponding to theto-be-operated account information is in a frozen state, executing anunfreezing operation on the account corresponding to the to-be-operatedaccount information.

In one embodiment, the “executing by the processing unit 403 anoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract” comprises: if theoperation content is to suspend an account, executing a suspendingoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount suspension comprised in the smart contract, the suspendingoperation being used to instruct the account corresponding to theto-be-operated account information to stop execution of transactions.

In one embodiment, the “executing by the processing unit 403 anoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract” comprises: if theoperation content is to resume an account, executing a resumingoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding toaccount resumption comprised in the smart contract, the resumingoperation being used to instruct the account corresponding to theto-be-operated account information to resume execution of transactions.

In one embodiment, before executing a resuming operation on an accountcorresponding to the to-be-operated account information, the decidingunit 404 determines whether the account corresponding to theto-be-operated account information is in a suspended state.

The “executing by the processing unit 403 a resuming operation on anaccount corresponding to the to-be-operated account information”comprises: when it is determined that the account corresponding to theto-be-operated account information is in a suspended state, executing aresuming operation on the account corresponding to the to-be-operatedaccount information.

In one embodiment, the “executing by the processing unit 403 anoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract” comprises: if theoperation content is to close an account, executing a closing operationon an account corresponding to the to-be-operated account informationaccording to a transaction processing logic corresponding to accountclosure comprised in the smart contract, the closing operation beingused to instruct to stop execution of transactions.

In one embodiment, the “executing by the processing unit 403 a closingoperation on an account corresponding to the to-be-operated accountinformation” comprises: determining an account information queuecorresponding to the to-be-operated account information, andsequentially executing a suspending operation on an accountcorresponding to each piece of the account information in the accountinformation queue.

In one embodiment, the “processing unit 403 executing an operation on anaccount corresponding to the to-be-operated account informationaccording to a transaction processing logic corresponding to theoperation content comprised in the smart contract” comprises: if theoperation content is to open an account, executing an opening operationon an account corresponding to the to-be-operated account informationaccording to a transaction processing logic corresponding to accountopening comprised in the smart contract, the opening operation beingused to resume execution of transactions.

In one embodiment, the “executing by the processing unit 403 anoperation on an account corresponding to the to-be-operated accountinformation according to a transaction processing logic corresponding tothe operation content comprised in the smart contract” comprises: if theoperation content is a mandatory transfer, executing a mandatorytransfer operation on an account corresponding to the to-be-operatedaccount information according to a transaction processing logiccorresponding to mandatory transfer comprised in the smart contract, themandatory transfer operation being used for mandatory transfer of a setquantity of resources from the account corresponding to theto-be-operated account information according to the operation content.

In one example, the blockchain-based transaction processing apparatus asshown in FIG. 4 can be disposed in a node of a blockchain network. Thenode may comprise a server that is an individual apparatus or a systemcomprising a plurality of apparatuses. Alternatively, the node maycomprise a terminal, e.g., cell phone, tablet computer, personalcomputer and the like. According to one aspect of the presentdisclosure, the units 401-403 are software functional units stored in amemory, e.g., a non-transitory and computer-readable memory. Theapparatus 400 may include a processor for executing the softwarefunctional units 401-403 to perform the relevant functions. According toanother aspect, the units 401-403 may be implemented by hardware, e.g.,circuitry programmed to perform the functionalities.

In some embodiments, the transaction processing apparatus may beimplemented in a software manner or a hardware manner, which is notlimited herein. Upon receiving an operation instruction, the transactionprocessing apparatus can effectively determine whether the issuing ofthe operation instruction is legal. If it is legal, the transactionprocessing apparatus invokes a corresponding smart contract, executescorresponding operations on an account corresponding to theto-be-operated account information, and achieves supervision on accountsin the blockchain and processing special transactions likeadministrative intervention in a blockchain.

In the 1990s, an improvement to a technology could be differentiatedinto a hardware improvement (e.g. an improvement to a circuit structure,such as a diode, a transistor, a switch, and the like) or a softwareimprovement (an improvement to a flow of a method). Along with thetechnological development, however, many current improvements to methodflows can be deemed as direct improvements to hardware circuitstructures. Designers can obtain a corresponding hardware circuitstructure by programming an improved method flow into a hardwarecircuit. Therefore, an improvement to a method flow can be realized byhardware implementation. For example, Programmable Logic Device (PLD)(e.g., Field Programmable Gate Array (FPGA)) is such an integratedcircuit that its logic functions are determined by a user throughprogramming the device. A designer can program to “integrate” a digitalsystem onto one piece of PLD, without asking a chip manufacturer todesign and manufacture a dedicated IC chip. At present, this type ofprogramming has mostly been implemented through “logic compiler”software, rather than manually manufacturing the IC chips. The logiccompiler software is similar to a software compiler used for programdevelopment and writing, while a particular programming language is usedfor writing source codes prior to compiling, which is referred to as aHardware Description Language (HDL). There is not just one, but manytypes of HDL, such as ABEL (Advanced Boolean Expression Language), AHDL(Altera Hardware Description Language), Confluence, CUPL (CornellUniversity Programming Language), HDCal, JHDL (Java Hardware DescriptionLanguage), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware DescriptionLanguage). The most commonly used HDL includes VHDL (Very-High-SpeedIntegrated Circuit Hardware Description Language) and Verilog. A personskilled in the art would have known obtaining a hardware circuit toimplement a logic method flow by using the above HDLs to perform somelogic programming on the method flow and program it into an IC.

A controller may be implemented in any proper manner. For example, acontroller may be in, for example, a form of a microprocessor orprocessor, as well as a computer readable medium that stores computerreadable program codes (e.g. software or firmware) capable of beingexecuted by the (micro) processor, a logic gate, a switch, anApplication Specific Integrated Circuit (ASIC), a programmable logiccontroller and an embedded microcontroller. Examples of the controllerinclude, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320.A memory controller may further be implemented as a part of a controllogic of a memory. A person skilled in the art should also be awarethat, in addition to that a controller is implemented in a manner ofpure computer readable program codes, it is feasible to perform logicprogramming on steps of a method to enable a controller to implement thesame functions in a form of a logic gate, a switch, an ASIC, aprogrammable logic controller and an embedded microcontroller.Therefore, such a controller can be deemed as a hardware part, whiledevices comprised therein and configured to carry out various functionsmay also be deemed as a structure inside the hardware part.Alternatively, devices configured to carry out various functions may bedeemed as both software modules to implement a method and a structureinside a hardware part.

The system, apparatus, module or unit described in the above embodimentsmay be implemented by a computer chip or entity or implemented by aproduct having a function. A typical implementation device is acomputer. For example, a computer may be, for example, a personalcomputer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a medium player, a navigationdevice, an email apparatus, a game console, a tablet computer, awearable device or a combination of any devices in these devices.

For convenience of description, the above apparatus is divided intovarious units according to functions for description. Functions of theunits may be implemented in one or multiple pieces of software and/orhardware when implementing the present disclosure.

A person skilled in the art should understand that the embodiments ofthe present disclosure may be provided as a method, a system, or acomputer program product. Therefore, the disclosed system may beimplemented as a complete hardware embodiment, a complete softwareembodiment, or an embodiment combing software and hardware forperforming the disclosed methods. Moreover, the disclosed system may bein the form of a computer program product implemented on one or morecomputer usable storage media (including, but not limited to, a magneticdisk memory, CD-ROM, an optical memory, and the like) comprisingcomputer usable program codes therein.

The disclosed system is described with reference to flowcharts and/orblock diagrams of the method, device (system) and computer programproduct according to the embodiments of the present disclosure. Acomputer program instruction may be used to implement each processand/or block in the flowcharts and/or block diagrams and a combinationof processes and/or blocks in the flowcharts and/or block diagrams.These computer program instructions may be provided for ageneral-purpose computer, a special-purpose computer, an embeddedprocessor, or a processor of other programmable data processing devicesto generate a machine, so that the instructions executed by a computeror a processor of other programmable data processing devices generate anapparatus for implementing a specified function in one or more processesin the flowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be stored in a computerreadable memory that can instruct a computer or other programmable dataprocessing devices to work in a particular manner, such that theinstructions stored in the computer readable memory generate amanufactured article that includes an instruction apparatus. Theinstruction apparatus implements one or more functions in one or moreprocesses in the flowcharts and/or in one or more blocks in the blockdiagrams.

These computer program instructions may also be loaded onto a computeror other programmable data processing devices, such that a series ofoperational steps are performed on the computer or other programmabledevices, thereby generating computer-implemented processing. Therefore,the instructions executed on the computer or other programmable devicesprovide steps for implementing one or more functions in one or moreprocesses in the flowcharts and/or in one or more blocks in the blockdiagrams.

In a typical configuration, the computation device includes one or moreCentral Processing Units (CPUs), input/output interfaces, networkinterfaces, and a memory.

The memory may include computer readable media, such as a volatilememory, a Random Access Memory (RAM), and/or a non-volatile memory,e.g., a Read-Only Memory (ROM) or a flash RAM. The memory is an exampleof a computer readable medium.

Computer readable media include permanent, volatile, mobile and immobilemedia, which can implement information storage through any method ortechnology. The information may be computer readable instructions, datastructures, program modules or other data. Examples of storage media ofcomputers include, but are not limited to, Phase-change RAMs (PRAMs),Static RAMs (SRAMs), Dynamic RAMs (DRAMs), other types of Random AccessMemories (RAMs), Read-Only Memories (ROMs), Electrically ErasableProgrammable Read-Only Memories (EEPROMs), flash memories or othermemory technologies, Compact Disk Read-Only Memories (CD-ROMs), DigitalVersatile Discs (DVDs) or other optical memories, cassettes, cassetteand disk memories or other magnetic memory devices or any othernon-transmission media, which can be used for storing informationaccessible to a computation device. According to the definitions herein,the computer readable media do not include transitory media, such asmodulated data signals and carriers.

The terms of “including”, “comprising” or any other variants thereofintend to encompass a non-exclusive inclusion, such that a process,method, commodity or device comprising a series of elements not onlycomprises these elements, but also comprises other elements that are notlisted, or further comprises elements that are inherent to the process,method, commodity or device. When there is no further restriction,elements defined by the statement “comprising one . . . ” does notexclude additional similar elements in a process, method, commodity ordevice that comprises the defined elements.

A person skilled in the art should understand that the embodiments ofthe present disclosure may be provided as a method, a system, or acomputer program product. Therefore, the present disclosure may beimplemented as a complete hardware embodiment, a complete softwareembodiment, or an embodiment combing software and hardware. Moreover,the present disclosure may be in the form of a computer program productimplemented on one or more computer usable storage media (including, butnot limited to, a magnetic disk memory, CD-ROM, an optical memory, andthe like) comprising computer usable program codes therein.

The present disclosure may be described in a regular context of acomputer executable instruction that is executed by a computer, such asa program module. In various embodiments, the program module comprises aroutine, a program, an object, a component, a data structure, and thelike for executing a particular task or implementing a particularabstract data type. The present disclosure may also be practiced indistributed computing environments. In these distributed computingenvironments, remote processing devices connected via communicationnetworks carry out tasks. In the distributed computing environments, aprogram module can be located in local and remote computer storagemedia, including storage devices.

The embodiments in this description are described in a progressivemanner with each embodiment focusing on differences from otherembodiments, and the embodiments may be mutually referenced foridentical or similar parts thereof. For the system embodiment, thedescription thereof is relatively simple as it is substantially similarto the method embodiment. The description of the method embodiment maybe referenced for related parts thereof.

The embodiments of the present disclosure are merely exemplary, and arenot used to limit the present disclosure. To a person skilled in theart, the disclosed embodiments can be modified or changed in variousways. Any modification, equivalent substitution or improvement madewithin the spirit and principle of the present disclosure shall beencompassed by the claims of the present disclosure.

The invention claimed is:
 1. A method, comprising: receiving, at acomputing device from an account, account information of a differentaccount in need of administrative supervision and a first operationcontent, the account having one or more administrative supervisioncapabilities over the different account through different smartcontracts corresponding to the account; generating, at the computingdevice, an operation instruction comprising the account information andthe first operation content; sending, at the computing device, theoperation instruction to one or more nodes in a blockchain network;selecting, at the one or more nodes, based on a first mappingrelationship between different operation contents of the account and thedifferent smart contracts corresponding to the account, a first smartcontract of the different smart contracts that corresponds to the firstoperation content; and executing, by invoking the first smart contractat the one or more nodes, an operation according to the first operationcontent on the different account corresponding to the accountinformation.
 2. The method of claim 1, further comprising: determining,at the computing device, a summary of the operation instruction; andencrypting, at the computing device, using a private key in apublic-private key pair corresponding to the account, the summary toobtain an encrypted summary; and wherein sending the operationinstruction to the one or more nodes in the blockchain networkcomprises: sending the encrypted summary and the operation instructionto the one or more nodes in the blockchain network.
 3. The method ofclaim 2, wherein, the account is a first account of different accounts,wherein each of the different accounts has a different public-privatekey pair.
 4. The method of claim 1, before receiving the accountinformation of the different account in need of administrativesupervision and the first operation content, further comprising:configuring, at the computing device, the different smart contractscorresponding to the account according to one or more attributes of theaccount.
 5. The method of claim 1, wherein executing the operationcomprises: freezing the different account, unfreezing the differentaccount, suspending the different account, resuming the differentaccount, closing the different account, opening the different account,or a mandatory transfer of a set quantity of resources from thedifferent account.
 6. The method of claim 1, before sending theoperation instruction to the one or more nodes in the blockchainnetwork, further comprising: digitally signing, at the computing device,the operation instruction with a digital signature of the account,wherein sending the operation instruction to the one or more nodes inthe blockchain network comprises: sending the signed operationinstruction to the one or more nodes in the blockchain network.
 7. Themethod of claim 6, further comprising: verifying, at the one or morenodes, that the operation instruction sent by the computing device issigned by the account.
 8. The method of claim 1, further comprising:configuring different smart contracts corresponding to differentaccounts, the different accounts comprising the account; and creating asecond mapping relationship between the different accounts and thedifferent smart contracts corresponding to the different accounts,wherein each of the different smart contracts corresponding to thedifferent accounts is configured to execute a respective operation. 9.The method of claim 1, further comprising: configuring the differentoperation contents of the account for the different smart contractscorresponding to the account; and creating the first mappingrelationship between the different operation contents and the differentsmart contracts corresponding to the account.
 10. One or morenon-transitory computer-readable mediums storing instructions executableby one or more processors, wherein execution of the instructions causethe one or more processors to perform operations comprising: receiving,from an account, account information of a different account in need ofadministrative supervision and a first operation content, the accounthaving one or more administrative supervision capabilities over thedifferent account through different smart contracts corresponding to theaccount; generating an operation instruction comprising the accountinformation and the first operation content; sending the operationinstruction to one or more nodes in a blockchain network; selecting, atthe one or more nodes, based on a first mapping relationship betweendifferent operation contents of the account and the different smartcontracts corresponding to the account, a first smart contract of thedifferent smart contracts that corresponds to the first operationcontent; and executing, by invoking the first smart contract at the oneor more nodes, an operation according to the first operation content onthe different account corresponding to the account information.
 11. Theone or more non-transitory computer-readable mediums of claim 10,wherein the operations further comprise: determining a summary of theoperation instruction; and encrypting using a private key in apublic-private key pair corresponding to the account, the summary toobtain an encrypted summary; and wherein sending the operationinstruction to the one or more nodes in the blockchain networkcomprises: sending the encrypted summary and the operation instructionto the one or more nodes in the blockchain network.
 12. The one or morenon-transitory computer-readable mediums of claim 11, wherein, theaccount is a first account of different accounts, wherein each of thedifferent accounts has a different public-private key pair.
 13. The oneor more non-transitory computer-readable mediums of claim 10, whereinthe operations further comprise: before receiving the accountinformation of the different account in need of administrativesupervision and the first operation content, configuring the differentsmart contracts corresponding to the account according to one or moreattributes of the account.
 14. The one or more non-transitorycomputer-readable mediums of claim 10, wherein executing the operationcomprises: freezing the different account, unfreezing the differentaccount, suspending the different account, resuming the differentaccount, closing the different account, opening the different account,or a mandatory transfer of a set quantity of resources from thedifferent account.
 15. The one or more non-transitory computer-readablemediums of claim 10, wherein the operations further comprise: beforesending the operation instruction to the one or more nodes in theblockchain network, digitally signing the operation instruction with adigital signature of the account, wherein sending the operationinstruction to the one or more nodes in the blockchain networkcomprises: sending the signed operation instruction to the one or morenodes in the blockchain network.
 16. The one or more non-transitorycomputer-readable mediums of claim 15, wherein the operations furthercomprise: verifying, at the one or more nodes, that the operationinstruction is signed by the account.
 17. The one or more non-transitorycomputer-readable mediums of claim 10, wherein the operations furthercomprise: configuring different smart contracts corresponding todifferent accounts, the different accounts comprising the account; andcreating a second mapping relationship between the different accountsand the different smart contracts corresponding to the differentaccounts, wherein each of the different smart contracts corresponding tothe different accounts is configured to execute a respective operation.18. The one or more non-transitory computer-readable mediums of claim10, wherein the operations further comprise: configuring the differentoperation contents of the account for the different smart contractscorresponding to the account; and creating the first mappingrelationship between the different operation contents and the differentsmart contracts corresponding to the account.
 19. A system, comprising:one or more processors; and one or more non-transitory computer-readablemediums storing instructions executable by the one or more processors,wherein execution of the instructions cause the one or more processorsto perform operations comprising: receiving, from an account, accountinformation of a different account in need of administrative supervisionand a first operation content, the account having one or moreadministrative supervision capabilities over the different accountthrough different smart contracts corresponding to the account;generating an operation instruction comprising the account informationand the first operation content; sending the operation instruction toone or more nodes in a blockchain network; selecting, at the one or morenodes, based on a first mapping relationship between different operationcontents of the account and the different smart contracts correspondingto the account, a first smart contract of the different smart contractsthat corresponds to the first operation content; and executing, byinvoking the first smart contract at the one or more nodes, an operationaccording to the first operation content on the different accountcorresponding to the account information.
 20. The system of claim 19,wherein the operations further comprise: determining a summary of theoperation instruction; and encrypting using a private key in apublic-private key pair corresponding to the account, the summary toobtain an encrypted summary; and wherein sending the operationinstruction to the one or more nodes in the blockchain networkcomprises: sending the encrypted summary and the operation instructionto the one or more nodes in the blockchain network.